package com.ylr.admin.framework.feign.client;

import com.ylr.admin.framework.feign.fallback.YaUserClientFallback;
import com.ylr.base.common.po.user.UserAuthenticationDto;
import com.ylr.base.common.tool.Result;
import com.ylr.admin.framework.feign.YaUserBaseClient;
import com.ylr.admin.framework.feign.configuration.ClientConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-11 17:59:32
 * className: YaUserClient
 * version: 1.0
 * description:
 */
@FeignClient(value = "ylr-admin", contextId = "YaUserClient", path = "/api/user", fallback = YaUserClientFallback.class,
        configuration = ClientConfiguration.class)
public interface YaUserClient extends YaUserBaseClient {

    /**
     * 获取用户认证数据操作
     * @param userId 用户主键
     * @return 用户关联的系统接口数据
     */
    @GetMapping("/getUserUri")
    Result<UserAuthenticationDto> getAuthentication(@RequestParam("userId") Long userId);

}
